package org.christopher.mybatisplusdemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.math.BigDecimal;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("user")  //当实体类名和表名不统一，我们用这个注解进行表示
public class User {
    @TableId(value = "id",type = IdType.AUTO)   //用户指定我们的主键id,并设定为自增
    private Integer id;
    private String name;
    private String username;
    private String password;
    private BigDecimal cash;
}
